#字典遍历练习
#升职加薪
employee_information = {"张三丰":
                            {"部门" : "科技部",
                             "工资": 3000,
                             "级别": 1},
                        "郭靖":
                            {"部门": "市场部",
                             "工资": 5000,
                             "级别": 2},
                        "黄药师":
                            {"部门": "市场部",
                             "工资": 7000,
                             "级别": 3},
                        "欧阳锋":
                            {"部门": "科技部",
                             "工资": 4000,
                             "级别": 1},
                        "洪七公":
                            {"部门": "市场部",
                             "工资": 6000,
                             "级别": 2}
                        }
#输出升职加薪前的信息
print("升值加薪前员工信息如下：")
for name in employee_information:
    print(name,employee_information[name],sep=': ',end = '\n')

#通过遍历字典，所有等级为一的员工级别加一级，工资涨1000元
for name in employee_information:
    if   employee_information[name]["级别"] == 1:
        employee_information[name]["级别"] += 1
        employee_information[name]["工资"] += 1000

#输出升职加薪后的结果
print("升值加薪后员工信息如下：")
for name in employee_information:
    print(name,employee_information[name],sep=': ',end = '\n')


